<?php

/* 品牌 brand */
class AdModel extends BaseModel
{
    var $table  = 'ad';
    var $prikey = 'ad_tid';
    var $_name  = 'ad';
        /*
     * 判断名称是否唯一
     */
    function unique($title, $ad_tid = 0)
    {
        $conditions = "title = '" . $title . "' AND ad_tid != ".$ad_tid."";
        return count($this->find(array('conditions' => $conditions))) == 0;
    }
    
}

?>